﻿namespace Modbus
{
	internal static class ModbusSpecification
	{
		internal const int MinQuantity = 1;

		// Read Coils.
		internal const int ReadCoilsMaxQuantity = 2000;

		// Read Discrete Inputs.
		internal const int ReadDiscreteInputsMaxQuantity = 2000;

		// Read Holding Registers.
		internal const int ReadHoldingRegistersMaxQuantity = 125;

		// Read Input Registers.
		internal const int ReadInputRegistersMaxQuantity = 125;

		// Write Single Coil.
		internal const ushort OutputStateON  = 0xFF00;
		internal const ushort OutputStateOFF = 0x0000;

		// Write Multiple Coils.
		internal const int WriteMultipleCoilsMaxQuantity = 2000;

		// Write Multiple Registers.
		internal const int WriteMultipleRegistersMaxQuantity = 123;

		// Read/Write Multiple Registers.
		internal const int ReadWriteMultipleRegistersMaxReadQuantity  = 125;
		internal const int ReadWriteMultipleRegistersMaxWriteQuantity = 121;
	}
}
